﻿<?xml version="1.0" encoding="utf-8"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:c4fConverters="clr-namespace:Coding4Fun.Toolkit.Controls.Converters" xmlns:local="clr-namespace:Coding4Fun.Toolkit.Controls" xmlns:Binding="clr-namespace:Coding4Fun.Toolkit.Controls.Binding" xmlns:Primitives="clr-namespace:Coding4Fun.Toolkit.Controls.Primitives">
  <!--WindowsPhone7-->
  <c4fConverters:SolidColorBrushToColorConverter x:Key="BrushToBrush" />
  <SolidColorBrush x:Key="DefaultAccentBrush" Color="{Binding Source={StaticResource PhoneAccentBrush}, Converter={StaticResource BrushToBrush}}" />
  <SolidColorBrush x:Key="DefaultChromeBrush" Color="{Binding Source={StaticResource PhoneChromeBrush}, Converter={StaticResource BrushToBrush}}" />
  <SolidColorBrush x:Key="DefaultBackgroundBrush" Color="{Binding Source={StaticResource PhoneBackgroundBrush}, Converter={StaticResource BrushToBrush}}" />
  <SolidColorBrush x:Key="DefaultForegroundBrush" Color="{Binding Source={StaticResource PhoneForegroundBrush}, Converter={StaticResource BrushToBrush}}" />
  <SolidColorBrush x:Key="DefaultSubtleBrush" Color="{Binding Source={StaticResource PhoneSubtleBrush}, Converter={StaticResource BrushToBrush}}" />
  <SolidColorBrush x:Key="DefaultDisabledBrush" Color="{Binding Source={StaticResource PhoneDisabledBrush}, Converter={StaticResource BrushToBrush}}" />
  <SolidColorBrush x:Key="DefaultContrastDisabledBrush" Color="{Binding Source={StaticResource PhoneChromeBrush}, Converter={StaticResource BrushToBrush}}" />
  <SolidColorBrush x:Key="DefaultSemiTransparentBrush" Color="{Binding Source={StaticResource PhoneSemitransparentBrush}, Converter={StaticResource BrushToBrush}}" />
  <sys:Double x:Key="DefaultFontSizeExtraSmall">12</sys:Double>
  <sys:Double x:Key="DefaultFontSizeNormal">20</sys:Double>
  <sys:Double x:Key="DefaultFontSizeMedium">22.667</sys:Double>
  <sys:Double x:Key="DefaultFontSizeMediumLarge">25.333</sys:Double>
  <sys:Double x:Key="DefaultFontSizeLarge">32</sys:Double>
  <FontFamily x:Key="FontFamilySegoeNormal">Segoe WP</FontFamily>
  <FontFamily x:Key="FontFamilySegoeSemiBold">Segoe WP Semibold</FontFamily>
  <FontFamily x:Key="FontFamilySegoeSemiLight">Segoe WP SemiLight</FontFamily>
  <sys:Double x:Key="DefaultAppButtonSize">70</sys:Double>
  <sys:Double x:Key="DefaultTileSize">173</sys:Double>
  <Thickness x:Key="DefaultTextBoxInnerMargin">1,2</Thickness>
  <Thickness x:Key="DefaultBorderThickness">3</Thickness>
  <SolidColorBrush x:Key="DefaultTextBoxBrush" Color="{Binding Source={StaticResource PhoneTextBoxBrush}, Converter={StaticResource BrushToBrush}}" />
  <SolidColorBrush x:Key="DefaultTextBoxForegroundBrush" Color="{Binding Source={StaticResource PhoneTextBoxForegroundBrush}, Converter={StaticResource BrushToBrush}}" />
  <SolidColorBrush x:Key="DefaultTextBoxReadOnlyBrush" Color="{Binding Source={StaticResource PhoneTextBoxReadOnlyBrush}, Converter={StaticResource BrushToBrush}}" />
  <SolidColorBrush x:Key="DefaultTextBoxEditBackgroundBrush" Color="{Binding Source={StaticResource PhoneTextBoxEditBackgroundBrush}, Converter={StaticResource BrushToBrush}}" />
  <SolidColorBrush x:Key="DefaultTextBoxEditBorderBrush" Color="{Binding Source={StaticResource PhoneTextBoxEditBorderBrush}, Converter={StaticResource BrushToBrush}}" />
  <SolidColorBrush x:Key="DefaultTextBoxSelectionForegroundBrush" Color="{Binding Source={StaticResource PhoneTextBoxSelectionForegroundBrush}, Converter={StaticResource BrushToBrush}}" />
  <ControlTemplate x:Key="DisabledChatBubbleTextBoxTemplate" TargetType="TextBox">
    <ContentControl x:Name="ContentElement" BorderThickness="0" Margin="{TemplateBinding Margin}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
  </ControlTemplate>
  <GridLength x:Key="GridMinimized">48</GridLength>
  <Style x:Key="AppBarText" TargetType="ContentControl">
    <Setter Property="HorizontalAlignment" Value="Center" />
    <Setter Property="Margin" Value="0" />
  </Style>
  <Style TargetType="local:ImageTile">
    <Setter Property="Background" Value="{StaticResource DefaultAccentBrush}" />
    <Setter Property="Foreground" Value="{StaticResource DefaultForegroundBrush}" />
    <Setter Property="FontFamily" Value="{StaticResource FontFamilySegoeSemiBold}" />
    <Setter Property="FontSize" Value="{StaticResource DefaultFontSizeNormal}" />
    <Setter Property="Margin" Value="10" />
    <Setter Property="Padding" Value="10,0" />
    <Setter Property="VerticalAlignment" Value="Top" />
    <Setter Property="HorizontalAlignment" Value="Right" />
    <Setter Property="MinWidth" Value="36" />
    <Setter Property="MinHeight" Value="36" />
    <Setter Property="Width" Value="{StaticResource DefaultTileSize}" />
    <Setter Property="Height" Value="{StaticResource DefaultTileSize}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:ImageTile">
          <Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="{TemplateBinding Background}">
            <Grid x:Name="ImageContainer" />
            <ContentControl Content="{TemplateBinding Content}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" FontWeight="{TemplateBinding FontWeight}" />
            <ContentControl Content="{TemplateBinding Label}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" FontWeight="{TemplateBinding FontWeight}" VerticalAlignment="Bottom" HorizontalAlignment="Left" Padding="10, 0, 0, 10" Margin="0, 0, 0, -5" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:OpacityToggleButton">
    <Setter Property="Foreground" Value="{StaticResource DefaultForegroundBrush}" />
    <Setter Property="Background" Value="{StaticResource DefaultForegroundBrush}" />
    <Setter Property="FontFamily" Value="{StaticResource FontFamilySegoeSemiBold}" />
    <Setter Property="FontSize" Value="{StaticResource DefaultFontSizeExtraSmall}" />
    <Setter Property="ButtonWidth" Value="{StaticResource DefaultAppButtonSize}" />
    <Setter Property="ButtonHeight" Value="{StaticResource DefaultAppButtonSize}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:OpacityToggleButton">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CheckStates">
                <VisualState x:Name="Checked">
                  <Storyboard>
                    <DoubleAnimation Duration="{Binding AnimationDuration, RelativeSource={RelativeSource TemplatedParent}}" To="{Binding CheckedOpacity, RelativeSource={RelativeSource TemplatedParent}}" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentHost" />
                    <DoubleAnimation Duration="{Binding AnimationDuration, RelativeSource={RelativeSource TemplatedParent}}" To="{Binding CheckedOpacity, RelativeSource={RelativeSource TemplatedParent}}" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DisabledContentHost" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unchecked">
                  <Storyboard>
                    <DoubleAnimation Duration="{Binding AnimationDuration, RelativeSource={RelativeSource TemplatedParent}}" To="{Binding UncheckedOpacity, RelativeSource={RelativeSource TemplatedParent}}" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentHost" />
                    <DoubleAnimation Duration="{Binding AnimationDuration, RelativeSource={RelativeSource TemplatedParent}}" To="{Binding UncheckedOpacity, RelativeSource={RelativeSource TemplatedParent}}" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DisabledContentHost" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Indeterminate" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EnabledBackground">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DisabledBackground">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border Name="EnabledBackground" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" Padding="{TemplateBinding Padding}" BorderThickness="0" BorderBrush="Transparent" Background="Transparent">
              <StackPanel Orientation="{TemplateBinding Orientation}">
                <Grid Width="{TemplateBinding ButtonWidth}" Height="{TemplateBinding ButtonHeight}" Margin="0,-10, 0, 0">
                  <Grid Name="ContentHost">
                    <ContentControl Name="EnabledContent" Foreground="{TemplateBinding Background}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
                      <Grid Name="EnabledHolder">
                        <ContentControl Name="ContentBody" Content="{TemplateBinding Content}" />
                      </Grid>
                    </ContentControl>
                  </Grid>
                </Grid>
                <ContentControl Name="ContentTitle" Margin="0, -5, 0 , 0" Content="{TemplateBinding Label}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Style="{StaticResource AppBarText}" />
              </StackPanel>
            </Border>
            <Border Name="DisabledBackground" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" Padding="{TemplateBinding Padding}" BorderThickness="0" BorderBrush="Transparent" Background="Transparent" Visibility="Collapsed">
              <StackPanel Orientation="{TemplateBinding Orientation}">
                <Grid Width="{TemplateBinding ButtonWidth}" Height="{TemplateBinding ButtonHeight}" Margin="0,-10, 0, 0">
                  <Grid Name="DisabledContentHost">
                    <ContentControl Name="DisabledContent" Foreground="{StaticResource DefaultDisabledBrush}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
                      <Grid Name="DisabledHolder" />
                    </ContentControl>
                  </Grid>
                </Grid>
                <ContentControl Content="{TemplateBinding Label}" Foreground="{StaticResource DefaultDisabledBrush}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{Binding Margin, ElementName=ContentTitle}" Style="{StaticResource AppBarText}" />
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:RoundButton">
    <Setter Property="BorderBrush" Value="{StaticResource DefaultForegroundBrush}" />
    <Setter Property="Foreground" Value="{StaticResource DefaultForegroundBrush}" />
    <Setter Property="FontFamily" Value="{StaticResource FontFamilySegoeSemiBold}" />
    <Setter Property="PressedBrush" Value="{StaticResource DefaultAccentBrush}" />
    <Setter Property="FontSize" Value="{StaticResource DefaultFontSizeExtraSmall}" />
    <Setter Property="ButtonWidth" Value="{StaticResource DefaultAppButtonSize}" />
    <Setter Property="ButtonHeight" Value="{StaticResource DefaultAppButtonSize}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:RoundButton">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver" />
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ButtonBackground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding PressedBrush, RelativeSource={RelativeSource TemplatedParent}}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="ButtonRing">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ButtonBackground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentBody">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentTitle">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border Name="EnabledBackground" Padding="{TemplateBinding Padding}" BorderThickness="0" BorderBrush="Transparent" Background="Transparent">
              <StackPanel Orientation="{TemplateBinding Orientation}">
                <Grid Width="{TemplateBinding ButtonWidth}" Height="{TemplateBinding ButtonHeight}" Margin="0,-10, 0, 0">
                  <Ellipse x:Name="ButtonBackground" Stroke="Transparent" Fill="{TemplateBinding Background}" Margin="10" />
                  <Grid Name="ContentHost">
                    <ContentControl Name="ContentBody" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
                  </Grid>
                  <Ellipse x:Name="ButtonRing" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="3" Fill="Transparent" Margin="10" />
                </Grid>
                <ContentControl x:Name="ContentTitle" Content="{TemplateBinding Label}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Style="{StaticResource AppBarText}" />
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:RoundToggleButton">
    <Setter Property="BorderBrush" Value="{StaticResource DefaultForegroundBrush}" />
    <Setter Property="Foreground" Value="{StaticResource DefaultForegroundBrush}" />
    <Setter Property="FontFamily" Value="{StaticResource FontFamilySegoeSemiBold}" />
    <Setter Property="CheckedBrush" Value="{StaticResource DefaultAccentBrush}" />
    <Setter Property="FontSize" Value="{StaticResource DefaultFontSizeExtraSmall}" />
    <Setter Property="ButtonWidth" Value="{StaticResource DefaultAppButtonSize}" />
    <Setter Property="ButtonHeight" Value="{StaticResource DefaultAppButtonSize}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:RoundToggleButton">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CheckStates">
                <VisualState x:Name="Checked">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ButtonBackground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding CheckedBrush, RelativeSource={RelativeSource TemplatedParent}}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="DisabledButtonBackground">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="StrokeThickness" Storyboard.TargetName="DisabledButtonRing">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="0" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="DisabledContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultContrastDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unchecked" />
                <VisualState x:Name="Indeterminate" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EnabledBackground">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DisabledBackground">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border Name="EnabledBackground" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" Padding="{TemplateBinding Padding}" BorderThickness="0" BorderBrush="Transparent" Background="Transparent">
              <StackPanel Orientation="{TemplateBinding Orientation}">
                <Grid Width="{TemplateBinding ButtonWidth}" Height="{TemplateBinding ButtonHeight}" Margin="0,-10, 0, 0">
                  <Ellipse x:Name="ButtonBackground" Stroke="Transparent" Fill="{TemplateBinding Background}" Margin="10" />
                  <Grid Name="ContentHost">
                    <ContentControl Name="EnabledContent" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
                      <Grid Name="EnabledHolder">
                        <ContentControl Name="ContentBody" Content="{TemplateBinding Content}" />
                      </Grid>
                    </ContentControl>
                  </Grid>
                  <Ellipse x:Name="ButtonRing" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="3" Fill="Transparent" Margin="10" />
                </Grid>
                <ContentControl Name="ContentTitle" Margin="0, -5, 0 , 0" Content="{TemplateBinding Label}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Style="{StaticResource AppBarText}" />
              </StackPanel>
            </Border>
            <Border Name="DisabledBackground" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" Padding="{TemplateBinding Padding}" BorderThickness="0" BorderBrush="Transparent" Background="Transparent" Visibility="Collapsed">
              <StackPanel Orientation="{TemplateBinding Orientation}">
                <Grid Width="{TemplateBinding ButtonWidth}" Height="{TemplateBinding ButtonHeight}" Margin="0,-10, 0, 0">
                  <Ellipse x:Name="DisabledButtonBackground" Stroke="Transparent" Margin="10" />
                  <Grid Name="DisabledContentHost">
                    <ContentControl Name="DisabledContent" Foreground="{StaticResource DefaultDisabledBrush}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center">
                      <Grid Name="DisabledHolder" />
                    </ContentControl>
                  </Grid>
                  <Ellipse x:Name="DisabledButtonRing" Stroke="{StaticResource DefaultDisabledBrush}" StrokeThickness="3" Fill="Transparent" Margin="10" />
                </Grid>
                <ContentControl Content="{TemplateBinding Label}" Foreground="{StaticResource DefaultDisabledBrush}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{Binding Margin, ElementName=ContentTitle}" Style="{StaticResource AppBarText}" />
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:Tile">
    <Setter Property="Background" Value="{StaticResource DefaultAccentBrush}" />
    <Setter Property="Foreground" Value="{StaticResource DefaultForegroundBrush}" />
    <Setter Property="FontSize" Value="{StaticResource DefaultFontSizeNormal}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:Tile">
          <Grid Name="root" Background="{TemplateBinding Background}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver" />
                <VisualState x:Name="Pressed" />
                <VisualState x:Name="PointerOver" />
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="titleText">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultContrastDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="contentContainer">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultContrastDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="root">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <ContentControl Name="contentContainer" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Content="{TemplateBinding Content}" />
            <!-- 
							Label is an object but TextWrapping is TextBlock Only
							... this could blow up 
						-->
            <TextBlock Name="titleText" TextWrapping="{TemplateBinding TextWrapping}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" VerticalAlignment="Bottom" Padding="12, 0" Margin="0, 0, 0, 7" Text="{TemplateBinding Label}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:TileNotification">
    <Setter Property="Background" Value="{StaticResource DefaultChromeBrush}" />
    <Setter Property="Foreground" Value="{StaticResource DefaultForegroundBrush}" />
    <Setter Property="FontWeight" Value="SemiBold" />
    <Setter Property="FontSize" Value="{StaticResource DefaultFontSizeNormal}" />
    <Setter Property="Margin" Value="10" />
    <Setter Property="Padding" Value="9, -2, 8, 0" />
    <Setter Property="VerticalAlignment" Value="Top" />
    <Setter Property="HorizontalAlignment" Value="Right" />
    <Setter Property="MinWidth" Value="36" />
    <Setter Property="MinHeight" Value="36" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:TileNotification">
          <Grid>
            <Rectangle Fill="{TemplateBinding Background}" RadiusX="18" RadiusY="18" />
            <ContentControl Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:ChatBubble">
    <Setter Property="Background" Value="{StaticResource DefaultAccentBrush}" />
    <Setter Property="FontFamily" Value="{StaticResource FontFamilySegoeNormal}" />
    <Setter Property="FontSize" Value="{StaticResource DefaultFontSizeMediumLarge}" />
    <Setter Property="BorderBrush" Value="{StaticResource DefaultAccentBrush}" />
    <Setter Property="BorderThickness" Value="{StaticResource DefaultBorderThickness}" />
    <Setter Property="Padding" Value="6, 2" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:ChatBubble">
          <Grid Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver" />
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ContentBorder">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ContentBorder">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="LowerRightPath">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="LowerLeftPath">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="UpperRightPath">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="UpperLeftPath">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="ChatBubbleDirectionStates">
                <VisualState x:Name="UpperRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="UpperRightPath">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="UpperLeft">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="UpperLeftPath">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="LowerRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="LowerRightPath">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="LowerLeft">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="LowerLeftPath">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto" />
              <RowDefinition Height="Auto" />
              <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Border x:Name="ContentBorder" Grid.Row="1" Padding="{TemplateBinding Padding}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
              <ContentControl HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{StaticResource DefaultTextBoxInnerMargin}" Content="{TemplateBinding Content}" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" />
            </Border>
            <Path Name="LowerRightPath" Data="M0,0 L1,1 L1,0 " Grid.Row="2" Fill="{TemplateBinding BorderBrush}" Stretch="Fill" Margin="12,0" Height="12" Width="18" Visibility="Collapsed" HorizontalAlignment="Right" />
            <Path Name="LowerLeftPath" Data="M0,0 L0,1 L1,0" Grid.Row="2" Fill="{TemplateBinding BorderBrush}" Stretch="Fill" Margin="12,0" Height="12" Width="18" Visibility="Collapsed" HorizontalAlignment="Left" />
            <Path Name="UpperLeftPath" Data="M0,0 L1,1 L0,1 " Grid.Row="0" Fill="{TemplateBinding BorderBrush}" Stretch="Fill" Margin="12,0" Height="12" Width="18" Visibility="Collapsed" HorizontalAlignment="Left" />
            <Path Name="UpperRightPath" Data="M0,1 L1,1 L1,0 " Grid.Row="0" Fill="{TemplateBinding BorderBrush}" Stretch="Fill" Margin="12,0" Height="12" Width="18" Visibility="Collapsed" HorizontalAlignment="Right" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:ChatBubbleTextBox">
    <Setter Property="FontFamily" Value="{StaticResource FontFamilySegoeNormal}" />
    <Setter Property="FontSize" Value="{StaticResource DefaultFontSizeMediumLarge}" />
    <Setter Property="Background" Value="{StaticResource DefaultTextBoxBrush}" />
    <Setter Property="Foreground" Value="{StaticResource DefaultTextBoxForegroundBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource DefaultTextBoxBrush}" />
    <Setter Property="SelectionBackground" Value="{StaticResource DefaultAccentBrush}" />
    <Setter Property="SelectionForeground" Value="{StaticResource DefaultTextBoxSelectionForegroundBrush}" />
    <Setter Property="BorderThickness" Value="{StaticResource DefaultBorderThickness}" />
    <Setter Property="Padding" Value="6, 2" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:ChatBubbleTextBox">
          <Grid Background="Transparent">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver" />
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EnabledBorder">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DisabledOrReadonlyBorder">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="LowerRightPath">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="LowerLeftPath">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="UpperRightPath">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="UpperLeftPath">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="ReadOnly">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EnabledBorder">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Collapsed</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DisabledOrReadonlyBorder">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="DisabledOrReadonlyBorder">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultTextBoxBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="DisabledOrReadonlyBorder">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultTextBoxBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="DisabledOrReadonlyContent">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultTextBoxReadOnlyBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="EnabledBorder">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultTextBoxEditBackgroundBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="EnabledBorder">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultTextBoxEditBorderBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="LowerRightPath">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultTextBoxEditBorderBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="LowerLeftPath">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultTextBoxEditBorderBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="UpperRightPath">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultTextBoxEditBorderBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="UpperLeftPath">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultTextBoxEditBorderBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
              </VisualStateGroup>
              <VisualStateGroup x:Name="ChatBubbleDirectionStates">
                <VisualState x:Name="UpperRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="UpperRightPath">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="UpperLeft">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="UpperLeftPath">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="LowerRight">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="LowerRightPath">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="LowerLeft">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="LowerLeftPath">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto" />
              <RowDefinition Height="Auto" />
              <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Border x:Name="EnabledBorder" Grid.Row="1" Padding="{TemplateBinding Padding}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
              <Grid>
                <ContentControl x:Name="HintContentElement" BorderThickness="0" Background="Transparent" Margin="{StaticResource DefaultTextBoxInnerMargin}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Foreground="{StaticResource DefaultTextBoxReadOnlyBrush}" Content="{TemplateBinding Hint}" />
                <ContentControl x:Name="ContentElement" BorderThickness="0" Background="Transparent" Margin="{StaticResource DefaultTextBoxInnerMargin}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
              </Grid>
            </Border>
            <Border x:Name="DisabledOrReadonlyBorder" Grid.Row="1" Padding="{TemplateBinding Padding}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{StaticResource DefaultDisabledBrush}" Visibility="Collapsed">
              <TextBox x:Name="DisabledOrReadonlyContent" Background="Transparent" Foreground="{StaticResource DefaultDisabledBrush}" IsReadOnly="True" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" SelectionForeground="{TemplateBinding SelectionForeground}" SelectionBackground="{TemplateBinding SelectionBackground}" TextAlignment="{TemplateBinding TextAlignment}" TextWrapping="{TemplateBinding TextWrapping}" Text="{TemplateBinding Text}" Template="{StaticResource DisabledChatBubbleTextBoxTemplate}" />
            </Border>
            <Path Name="LowerRightPath" Data="M0,0 L1,1 L1,0 " Grid.Row="2" Fill="{TemplateBinding BorderBrush}" Stretch="Fill" Margin="12,0" Height="12" Width="18" Visibility="Collapsed" HorizontalAlignment="Right" />
            <Path Name="LowerLeftPath" Data="M0,0 L0,1 L1,0" Grid.Row="2" Fill="{TemplateBinding BorderBrush}" Stretch="Fill" Margin="12,0" Height="12" Width="18" Visibility="Collapsed" HorizontalAlignment="Left" />
            <Path Name="UpperLeftPath" Data="M0,0 L1,1 L0,1 " Grid.Row="0" Fill="{TemplateBinding BorderBrush}" Stretch="Fill" Margin="12,0" Height="12" Width="18" Visibility="Collapsed" HorizontalAlignment="Left" />
            <Path Name="UpperRightPath" Data="M0,1 L1,1 L1,0 " Grid.Row="0" Fill="{TemplateBinding BorderBrush}" Stretch="Fill" Margin="12,0" Height="12" Width="18" Visibility="Collapsed" HorizontalAlignment="Right" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:ColorHexagonPicker">
    <Setter Property="VerticalAlignment" Value="Center" />
    <Setter Property="HorizontalAlignment" Value="Center" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:ColorHexagonPicker">
          <StackPanel>
            <ContentPresenter Content="{TemplateBinding ColorBody}" />
            <ContentPresenter Content="{TemplateBinding GreyScaleBody}" />
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:ColorPicker">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:ColorPicker">
          <Grid>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SelectedHueColor">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="0" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="SampleSelector">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="0" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="SelectedColor">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto" />
              <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto" />
              <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Rectangle Margin="0,0,0,12" Height="24" Grid.Row="0" Grid.ColumnSpan="2" Name="SelectedColor" Fill="{TemplateBinding SolidColorBrush}" />
            <local:ColorSlider Width="24" Margin="0,0,12,0" IsColorVisible="false" Thumb="{TemplateBinding Thumb}" x:Name="ColorSlider" Grid.Row="2" />
            <Grid Name="Body" Grid.Column="1" Grid.Row="1">
              <Rectangle Name="SelectedHueColor" Fill="Red" />
              <Rectangle>
                <Rectangle.Fill>
                  <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                    <GradientStop Offset="0" Color="White" />
                    <GradientStop Offset="1" Color="Transparent" />
                  </LinearGradientBrush>
                </Rectangle.Fill>
              </Rectangle>
              <Rectangle>
                <Rectangle.Fill>
                  <LinearGradientBrush StartPoint="0,1" EndPoint="0, 0">
                    <GradientStop Offset="0" Color="Black" />
                    <GradientStop Offset="1" Color="Transparent" />
                  </LinearGradientBrush>
                </Rectangle.Fill>
              </Rectangle>
              <Grid Name="SampleSelector" VerticalAlignment="Top" HorizontalAlignment="Left">
                <Ellipse Height="22" Width="22" StrokeThickness="5" Stroke="Black" />
                <Ellipse Height="24" Width="24" StrokeThickness="3" Stroke="White" />
              </Grid>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:ColorSliderThumb">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:ColorSliderThumb">
          <Grid>
            <Rectangle Stroke="Black" StrokeThickness="6" />
            <Rectangle Stroke="White" StrokeThickness="3" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="ColorSliderSuperSlider" TargetType="local:SuperSlider">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:SuperSlider">
          <Grid x:Name="Body">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="IsEnabledRectangle">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="IsEnabledRectangle">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultChromeBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="IsEnabledRectangle">
                      <DiscreteObjectKeyFrame KeyTime="0" Value=".5" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ThumbContentPresenter">
                      <DiscreteObjectKeyFrame KeyTime="0" Value=".75" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle x:Name="BackgroundRectangle" Fill="{TemplateBinding Background}" />
            <Rectangle x:Name="ProgressRectangle" Fill="{TemplateBinding Foreground}" />
            <Rectangle x:Name="IsEnabledRectangle" Visibility="Collapsed" />
            <ContentPresenter Grid.Row="1" x:Name="ThumbContentPresenter" Content="{TemplateBinding Thumb}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:ColorSlider">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:ColorSlider">
          <Grid Name="Body">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="SelectedColor">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Rectangle Name="SelectedColor" Fill="{TemplateBinding SolidColorBrush}" />
            <local:SuperSlider x:Name="Slider" Orientation="{TemplateBinding Orientation}" Foreground="Transparent" Minimum="0" Maximum="360" Thumb="{TemplateBinding Thumb}" Style="{StaticResource ColorSliderSuperSlider}"></local:SuperSlider>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:MemoryCounter">
    <Setter Property="FontFamily" Value="Courier New" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:MemoryCounter">
          <Grid VerticalAlignment="Top" HorizontalAlignment="Right">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="100" />
              <ColumnDefinition Width="100" />
            </Grid.ColumnDefinitions>
            <Rectangle Grid.ColumnSpan="2" Fill="{StaticResource DefaultSemiTransparentBrush}" />
            <TextBlock Padding="0,0,10,0" Grid.Column="0" HorizontalAlignment="Right" Text="{TemplateBinding CurrentMemory}" />
            <TextBlock Padding="0,0,10,0" Grid.Column="1" HorizontalAlignment="Right" Text="{TemplateBinding PeakMemory}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="MetroFlowItemTextBlockStyle" TargetType="TextBlock">
    <Setter Property="FontSize" Value="{StaticResource DefaultFontSizeMediumLarge}" />
    <Setter Property="Margin" Value="12, 3, 0, 3" />
    <Setter Property="HorizontalAlignment" Value="Left" />
    <Setter Property="VerticalAlignment" Value="Bottom" />
  </Style>
  <Style x:Key="MetroFlowItemRectangleUnderlay" TargetType="Rectangle">
    <Setter Property="Fill" Value="{StaticResource DefaultChromeBrush}" />
    <Setter Property="Margin" Value="0, -.5" />
    <Setter Property="Opacity" Value=".8" />
  </Style>
  <Style x:Key="MetroFlowItemImage" TargetType="Image">
    <Setter Property="Margin" Value="0, -.5, 0, 0" />
    <Setter Property="Stretch" Value="UniformToFill" />
    <Setter Property="HorizontalAlignment" Value="Center" />
    <Setter Property="VerticalAlignment" Value="Center" />
  </Style>
  <Style x:Key="MetroFlowItemMainBody" TargetType="Panel">
    <Setter Property="Background" Value="{StaticResource DefaultChromeBrush}" />
    <Setter Property="Margin" Value="6, 0" />
  </Style>
  <Style TargetType="local:MetroFlowItem">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:MetroFlowItem">
          <Grid>
            <Grid Style="{StaticResource MetroFlowItemMainBody}">
              <Rectangle Fill="{StaticResource DefaultAccentBrush}" />
              <Image Source="{TemplateBinding ImageSource}" Visibility="{TemplateBinding ImageVisibility}" Opacity="{TemplateBinding ImageOpacity}" Style="{StaticResource MetroFlowItemImage}" />
              <Grid VerticalAlignment="Bottom">
                <Rectangle Style="{StaticResource MetroFlowItemRectangleUnderlay}" />
                <TextBlock Text="{TemplateBinding Title}" Visibility="{TemplateBinding TitleVisibility}" Opacity="{TemplateBinding TitleOpacity}" Style="{StaticResource MetroFlowItemTextBlockStyle}" />
                <TextBlock Text="{TemplateBinding ItemIndexString}" Visibility="{TemplateBinding ItemIndexVisibility}" Opacity="{TemplateBinding ItemIndexOpacity}" Style="{StaticResource MetroFlowItemTextBlockStyle}" />
              </Grid>
            </Grid>
            <Rectangle Fill="Transparent" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:MetroFlow">
    <Setter Property="Height" Value="120" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:MetroFlow">
          <Grid Name="LayoutRoot">
            <local:MetroFlowItem Title="MetroFlow Control" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:ProgressOverlay">
    <Setter Property="Background" Value="{StaticResource DefaultSemiTransparentBrush}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:ProgressOverlay">
          <Grid Background="{TemplateBinding Background}" Name="LayoutGrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
            <Grid.Resources>
              <Storyboard x:Key="fadeOut" x:Name="FadeOutStoryboard">
                <DoubleAnimation Duration="0:0:0.5" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutGrid" />
              </Storyboard>
              <Storyboard x:Key="fadeIn" x:Name="FadeInStoryboard">
                <DoubleAnimation Duration="0:0:0.5" From="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="LayoutGrid" />
              </Storyboard>
            </Grid.Resources>
            <Rectangle Fill="Transparent" />
            <Grid>
              <ContentControl Content="{TemplateBinding Content}" HorizontalContentAlignment="Stretch" />
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:SuperImage">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:SuperImage">
          <Grid>
            <Border x:Name="PlaceholderBorder" Opacity="{TemplateBinding PlaceholderOpacity}" Background="{TemplateBinding PlaceholderBackground}">
              <Image x:Name="PlaceholderImage" Source="{TemplateBinding PlaceholderImageSource}" Stretch="{TemplateBinding PlaceholderImageStretch}" />
            </Border>
            <Image x:Name="PrimaryImage" Source="{TemplateBinding Source}" Stretch="{TemplateBinding Stretch}" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:SuperSlider">
    <Setter Property="Background" Value="{StaticResource DefaultChromeBrush}" />
    <Setter Property="Foreground" Value="{StaticResource DefaultAccentBrush}" />
    <Setter Property="Padding" Value="0, 3, 0, 36" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:SuperSlider">
          <Grid Name="Body">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto" />
              <RowDefinition />
            </Grid.RowDefinitions>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ProgressRectangle">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BackgroundRectangle">
                      <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultChromeBrush}" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid Grid.Row="1">
              <Border Margin="{TemplateBinding Padding}">
                <Grid Name="BarBody">
                  <Rectangle Grid.Row="1" Name="BackgroundRectangle" Fill="{TemplateBinding Background}" />
                  <Rectangle Grid.Row="1" Name="ProgressRectangle" Fill="{TemplateBinding Foreground}" />
                  <ContentPresenter Grid.Row="1" Content="{TemplateBinding Thumb}" />
                </Grid>
              </Border>
            </Grid>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:AboutPrompt">
    <Setter Property="Overlay" Value="{StaticResource DefaultSemiTransparentBrush}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:AboutPrompt">
          <Grid>
            <Rectangle Fill="Transparent" />
            <Border VerticalAlignment="Center" Width="460" Height="460" Background="{StaticResource DefaultChromeBrush}" BorderThickness="1" BorderBrush="{StaticResource DefaultForegroundBrush}">
              <Grid>
                <ContentPresenter Content="{TemplateBinding WaterMark}" />
                <Grid Margin="10">
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                  </Grid.RowDefinitions>
                  <TextBlock Grid.Row="0" VerticalAlignment="Top" Text="{TemplateBinding Title}" Margin="0,-10,-25,0" FontSize="56" TextWrapping="Wrap" FontFamily="Segoe WP Light" />
                  <ScrollViewer Grid.Row="1" Margin="0,0,0,10">
                    <ContentPresenter Content="{TemplateBinding Body}" />
                  </ScrollViewer>
                  <ContentPresenter Grid.Row="2" Content="{TemplateBinding Footer}" />
                  <StackPanel Name="actionButtonArea" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Grid.Row="3" />
                  <TextBlock Grid.Row="3" Margin="0,0,10,10" VerticalAlignment="Bottom" HorizontalAlignment="Right" Text="{TemplateBinding VersionNumber}" FontFamily="Segoe WP Light" />
                </Grid>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:AboutPromptItem">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:AboutPromptItem">
          <Grid Margin="0,11,0,0">
            <Grid.Resources>
              <Style x:Key="rightSide" TargetType="TextBlock">
                <Setter Property="Grid.Column" Value="1" />
                <Setter Property="Margin" Value="10,0,0,5" />
              </Style>
              <Style x:Key="leftSide" TargetType="TextBlock">
                <Setter Property="HorizontalAlignment" Value="Right" />
                <Setter Property="VerticalAlignment" Value="top" />
                <Setter Property="Grid.Column" Value="0" />
                <Setter Property="FontWeight" Value="Bold" />
              </Style>
            </Grid.Resources>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="80" />
              <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <TextBlock Style="{StaticResource leftSide}" Text="{TemplateBinding Role}" />
            <StackPanel Grid.Column="1">
              <TextBlock Name="author" Style="{StaticResource rightSide}" Text="{TemplateBinding AuthorName}" Visibility="Collapsed" />
              <TextBlock Name="website" Style="{StaticResource rightSide}" Text="{TemplateBinding WebSiteDisplay}" Visibility="Collapsed" />
              <TextBlock Name="emailAddress" Style="{StaticResource rightSide}" Text="{TemplateBinding EmailAddress}" Visibility="Collapsed" />
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:AppBarPrompt">
    <Setter Property="FontFamily" Value="{StaticResource FontFamilySegoeNormal}" />
    <Setter Property="FontSize" Value="{StaticResource DefaultFontSizeNormal}" />
    <Setter Property="VerticalAlignment" Value="Bottom" />
    <Setter Property="Background" Value="{StaticResource DefaultChromeBrush}" />
    <Setter Property="Overlay" Value="{StaticResource DefaultSemiTransparentBrush}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:AppBarPrompt">
          <Grid Background="{TemplateBinding Background}">
            <StackPanel x:Name="Body" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:AppBarPromptItem">
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="VerticalContentAlignment" Value="Top" />
    <Setter Property="BorderBrush" Value="{StaticResource DefaultForegroundBrush}" />
    <Setter Property="BorderThickness" Value="{StaticResource DefaultBorderThickness}" />
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="Padding" Value="0" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:AppBarPromptItem">
          <Border Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
            <Grid Margin="0,2,0,13">
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal" />
                  <VisualState x:Name="MouseOver" />
                  <VisualState x:Name="Pressed">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultAccentBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Disabled" />
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <Rectangle Fill="Transparent" />
              <TextBlock Name="ContentContainer" Margin="24,0" Text="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Style="{StaticResource PhoneTextNormalStyle}" FontSize="{StaticResource PhoneFontSizeExtraLarge}" FontFamily="{StaticResource FontFamilySegoeSemiLight}" />
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:InputPrompt">
    <Setter Property="FontFamily" Value="{StaticResource FontFamilySegoeNormal}" />
    <Setter Property="FontSize" Value="{StaticResource DefaultFontSizeNormal}" />
    <Setter Property="Foreground" Value="{StaticResource DefaultForegroundBrush}" />
    <Setter Property="Background" Value="{StaticResource DefaultChromeBrush}" />
    <Setter Property="Overlay" Value="{StaticResource DefaultSemiTransparentBrush}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:InputPrompt">
          <Grid>
            <Border VerticalAlignment="Top" Margin="10" Background="{TemplateBinding Background}" BorderThickness="1" BorderBrush="{StaticResource DefaultForegroundBrush}">
              <StackPanel Margin="10">
                <TextBlock Text="{TemplateBinding Title}" Margin="0, -10, -25, 0" TextWrapping="Wrap" FontFamily="{StaticResource FontFamilySegoeSemiLight}" FontSize="{StaticResource DefaultFontSizeLarge}" />
                <TextBlock Text="{TemplateBinding Message}" TextWrapping="{TemplateBinding MessageTextWrapping}" />
                <TextBox Name="inputBox" Binding:TextBinding.UpdateSourceOnChange="True" InputScope="{TemplateBinding InputScope}" Text="{TemplateBinding Value}" Margin="-12, 0" />
                <StackPanel Name="actionButtonArea" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0, 0, 0, -12" />
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:MessagePrompt">
    <Setter Property="FontFamily" Value="{StaticResource FontFamilySegoeNormal}" />
    <Setter Property="FontSize" Value="{StaticResource DefaultFontSizeNormal}" />
    <Setter Property="Foreground" Value="{StaticResource DefaultForegroundBrush}" />
    <Setter Property="Background" Value="{StaticResource DefaultChromeBrush}" />
    <Setter Property="Overlay" Value="{StaticResource DefaultSemiTransparentBrush}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:MessagePrompt">
          <Grid>
            <Border VerticalAlignment="Top" Margin="10" Background="{TemplateBinding Background}" BorderThickness="1" BorderBrush="{StaticResource DefaultForegroundBrush}">
              <StackPanel Margin="10">
                <TextBlock Text="{TemplateBinding Title}" Margin="0, -10, -25, 0" TextWrapping="Wrap" FontFamily="{StaticResource FontFamilySegoeSemiLight}" FontSize="{StaticResource DefaultFontSizeLarge}" />
                <ContentPresenter Content="{TemplateBinding Body}" Margin="0, 10" />
                <StackPanel Margin="0, 0, 0, -12" Name="actionButtonArea" Orientation="Horizontal" HorizontalAlignment="Center" />
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:PasswordInputPrompt">
    <Setter Property="FontFamily" Value="{StaticResource FontFamilySegoeNormal}" />
    <Setter Property="FontSize" Value="{StaticResource DefaultFontSizeNormal}" />
    <Setter Property="Foreground" Value="{StaticResource DefaultForegroundBrush}" />
    <Setter Property="Background" Value="{StaticResource DefaultChromeBrush}" />
    <Setter Property="Overlay" Value="{StaticResource DefaultSemiTransparentBrush}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:PasswordInputPrompt">
          <Grid>
            <Border VerticalAlignment="Top" Margin="10" Background="{TemplateBinding Background}" BorderThickness="1" BorderBrush="{StaticResource DefaultForegroundBrush}">
              <StackPanel Margin="10">
                <TextBlock Text="{TemplateBinding Title}" Margin="0, -10, -25, 0" TextWrapping="Wrap" FontFamily="{StaticResource FontFamilySegoeSemiLight}" FontSize="{StaticResource DefaultFontSizeLarge}" />
                <TextBlock Text="{TemplateBinding Message}" TextWrapping="{TemplateBinding MessageTextWrapping}" />
                <TextBox Name="inputBox" InputScope="{TemplateBinding InputScope}" Binding:TextBinding.UpdateSourceOnChange="True" Margin="-12, 0" />
                <StackPanel Name="actionButtonArea" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0, 0, 0, -12" />
              </StackPanel>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:ToastPrompt">
    <Setter Property="FontFamily" Value="{StaticResource FontFamilySegoeNormal}" />
    <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeSmall}" />
    <Setter Property="Foreground" Value="White" />
    <Setter Property="Background" Value="{StaticResource DefaultAccentBrush}" />
    <Setter Property="VerticalAlignment" Value="Top" />
    <Setter Property="Overlay" Value="Transparent" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:ToastPrompt">
          <Grid VerticalAlignment="{TemplateBinding VerticalAlignment}" Background="{TemplateBinding Background}">
            <StackPanel VerticalAlignment="Bottom" Margin="24, 32, 16, 5" Orientation="{TemplateBinding TextOrientation}">
              <StackPanel Margin="0,0,16,0" VerticalAlignment="Bottom" Orientation="Horizontal">
                <Image Margin="0,0,16,0" Visibility="Collapsed" Name="ToastImage" VerticalAlignment="Bottom" Width="{TemplateBinding ImageWidth}" Height="{TemplateBinding ImageHeight}" Source="{TemplateBinding ImageSource}" Stretch="{TemplateBinding Stretch}" />
                <TextBlock Text="{TemplateBinding Title}" FontWeight="Bold" VerticalAlignment="Center" Margin="0" Padding="0" />
              </StackPanel>
              <TextBlock Text="{TemplateBinding Message}" Margin="0" Padding="0" TextWrapping="{TemplateBinding TextWrapping}" VerticalAlignment="Center" />
            </StackPanel>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="Primitives:LoopingSelector">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <!--<Border Background="Transparent">-->
          <Canvas x:Name="ItemsPanel">
            <Canvas.RenderTransform>
              <TransformGroup>
                <TranslateTransform x:Name="CenteringTransform" />
                <TranslateTransform x:Name="PanningTransform" />
              </TransformGroup>
            </Canvas.RenderTransform>
          </Canvas>
          <!--</Border>-->
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="Primitives:LoopingSelectorItem">
    <Setter Property="Foreground" Value="{StaticResource DefaultSubtleBrush}" />
    <Setter Property="Padding" Value="6" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate>
          <Border x:Name="root" CacheMode="BitmapCache" Background="Transparent" Padding="{TemplateBinding Padding}">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="border" Storyboard.TargetProperty="Opacity" To="0" Duration="0:00:00.33" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Expanded">
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="border" Storyboard.TargetProperty="Opacity" To="1" Duration="0:00:00.33" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Selected">
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="background" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                    <DoubleAnimation Storyboard.TargetName="border" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="border" Storyboard.TargetProperty="BorderBrush" Duration="0">
                      <ObjectAnimationUsingKeyFrames.KeyFrames>
                        <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent" />
                      </ObjectAnimationUsingKeyFrames.KeyFrames>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentControl" Storyboard.TargetProperty="Foreground" Duration="0">
                      <ObjectAnimationUsingKeyFrames.KeyFrames>
                        <DiscreteObjectKeyFrame KeyTime="0" Value="White" />
                      </ObjectAnimationUsingKeyFrames.KeyFrames>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border.RenderTransform>
              <TranslateTransform x:Name="Transform" />
            </Border.RenderTransform>
            <Grid>
              <Rectangle x:Name="background" Margin="0" Opacity="0" Fill="{StaticResource DefaultAccentBrush}" CacheMode="BitmapCache" />
              <Border x:Name="border" Opacity="0" BorderThickness="3" BorderBrush="{StaticResource DefaultSubtleBrush}">
                <ContentControl x:Name="contentControl" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch">
                  <ContentPresenter x:Name="contentPresenter" CacheMode="BitmapCache" />
                </ContentControl>
              </Border>
            </Grid>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="local:TimeSpanPicker">
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}" />
    <Setter Property="Foreground" Value="{StaticResource DefaultForegroundBrush}" />
    <Setter Property="HorizontalContentAlignment" Value="Left" />
    <Setter Property="PickerPageUri" Value="/Coding4Fun.Toolkit.Controls;component/ValuePicker/TimeSpanPicker/TimeSpanPickerPage.xaml" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:TimeSpanPicker">
          <StackPanel>
            <ContentControl Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" Foreground="{StaticResource DefaultSubtleBrush}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="12,0,12,-4" />
            <Button x:Name="ValueButton" Content="{TemplateBinding ValueString}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" FontFamily="{TemplateBinding FontFamily}" Foreground="{TemplateBinding Foreground}" Height="72" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" />
          </StackPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>